# Contributor: Bradley J Chambers <brad.chambers@gmail.com>
# Maintainer: Bradley J Chambers <brad.chambers@gmail.com>
pkgname=hexer
pkgver=1.4.0
pkgrel=14
pkgdesc="LAS and OGR hexagonal density and boundary surface generation"
url="https://github.com/hobuinc/hexer"
arch="all"
license="LGPL-2.0-or-later"
options="!check"
makedepends="cmake gdal-dev"
subpackages="$pkgname-dev"
source="hexer-$pkgver.tar.gz::https://github.com/hobuinc/hexer/archive/$pkgver.tar.gz
	10-missing-includes.patch
	20-compile-test-for-execinfo.patch"

build() {
	mkdir build && cd build
	cmake .. \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_BUILD_TYPE=None
	make
}

package() {
	cd "$builddir"/build
	make DESTDIR="$pkgdir" install
}

sha512sums="
4db94af7fe0a2cc3cd26202c4ec88fadd88408c92d14e11ac117af51ee267aa87cd82aa18b29867f318d272f644be60a826e7fb3c72908baba4124499f39579c  hexer-1.4.0.tar.gz
971434a5c7b817296ecf7fa44222c0b7db909bef0c8bf130daef6b9db0ee68bab7aa8ef59aae1e6eda1daa801e4fbe2a5a88f22083d4c885de5a1e05310f9a0a  10-missing-includes.patch
9fd03681856e42ac5747b98a45542d24289bcd687c377035382835692df4ba23773bc9601d1b5b2c4e0a345aa8dac8b0c80a95a19f318b27b82a8bbfc87509cc  20-compile-test-for-execinfo.patch
"
